package com.jenkins.test.web;

import com.jenkins.test.base.BaseController;
import com.jenkins.test.response.Result;
import com.jenkins.test.system.entity.User;
import com.jenkins.test.system.service.impl.UserServiceImpl;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.List;

/**
 * @version V0.0.1
 * @ClassName: {@link UserController}
 * @Description: UserController
 * @author: Lanzhou
 * @date: 2021/6/10 22:57
 * @Copyright:2019 All rights reserved.
 * 注意：本内容仅限于本人开发与维护，禁止外泄以及用于其他的商业目
 */
@RestController
@RequestMapping("/user")
public class UserController extends BaseController<User, UserServiceImpl> {

    @GetMapping("/test")
    public Result<Integer> testInset() {
        List<User> users = new ArrayList<>();
        /*users.add(new User(6L, "jojo", 14, "jojo@166c.com"));
        users.add(new User(7L, "momo", 15, "momo@166c.com"));
        users.add(new User(8L, "qq", 14, "qq@166c.com"));
        users.add(new User(9L, "kuku", 10, "kuku@166c.com"));
        users.add(new User(10L, "mimi", 88, "mimi@166c.com"));*/
        int batchAdd = service.batchAdd(users);
        return Result.success(batchAdd);
    }


}
